// 登录
export interface ILoginRequestData {
  /** admin 或 editor */
  username: string
  /** 密码 */
  password: string
  /** 设备 */
  type: number
}

// 登录并返回 Token
export type LoginResponseData = IApiResponseData<{ token: string, u_id: string }>
// 获取个人信息数据

export type UserResponseData  = {
    username: string; 
    avatar: string | null; 
    phone: string; 
    type: number; 
    status: number; 
    update_time: string | null; 
    register_time: string; 
    gender: number;
    u_id: string;
  }

  export type UserInfoResponseData = {
    totalPages: number;
    currentPage: number;
    total: number;
    data: UserResponseData[];
  }

  // 获取个人权限列表
export type IApiResponseUserRoles = {
  id: number;
  pid: number;
  key: string;
  name: string;
  url: string;
  label: string;
  icon: string;
  path: string;
  is_del: number;
  node_type: 1 | 2 | 3;// 1: 菜单 2: 页面 3: 按钮
}













// 获取个人权限列表
export type RolesResponseData = IApiResponseData<IApiResponseUserRoles[]>
// 获取所有人信息列表
export type AllUserListResponseData = IApiResponseData<UserInfoResponseData>
// 获取全部角色列表
export type RolesListResponseData = IApiResponseData<{ roles: string[] }>

